package api

import (
	"fmt"
	"voice_chat_room/internal/config"

	"github.com/gin-gonic/gin"
)

func InitRouter() {
	r := gin.Default()

	api := r.Group("/api")
	{
		api.POST("/register", Register)
		api.POST("/login", Login)
		api.POST("/change_password", ChangePassword)
	}

	r.Run(fmt.Sprintf(":%d", config.Config.Port))
}
